package ticketing_system.Database;

import org.apache.commons.dbcp2.BasicDataSource;

import javax.sql.DataSource;

public class DS {
    private static DataSource ds;
    public static DataSource getDataSource(){
        if (ds == null){
            BasicDataSource bds = new BasicDataSource();
            bds.setDriverClassName("com.mysql.jdbc.Driver");
            bds.setUrl("jdbc:mysql:///software");
            bds.setUsername("root");
            bds.setPassword("root");
            ds = bds;
        }
        return ds;
    }
}
